xen:arm: arm64: Add correct MPIDR_HWID_MASK value for ARM64
authorWei Chen <wei.chen@linaro.org>
Tue, 31 May 2016 02:54:13 +0000 (10:54 +0800)
committerStefano Stabellini <sstabellini@kernel.org>
Wed, 1 Jun 2016 10:13:37 +0000 (11:13 +0100)
commit132d4aa00ed2447afe4bc7d2d37abc97e7ece209
tree780d9b64afd11d8d72199446ced8f04b5d4256e0
parentdf2a0b28476b54ae57c2455d3ab433da7ff9b0bf
xen:arm: arm64: Add correct MPIDR_HWID_MASK value for ARM64

Currently, MPIDR_HWID_MASK is using the bit definition of AArch32
MPIDR register. But from D7.2.67 of ARM ARM (DDI 0487A.i) we can see
there are 4 levels of affinity on AArch64 whilst AArch32 has only 3.
So, this value is not correct when Xen is running on AArch64.

Now, we use the value 0xff00ffffff for this macro on AArch64. But
neither of this value and its bitwise invert value can be used in mov
instruction with the encoding of {imm16:shift} or {imms:immr}. So we
have to use ldr to load the bitwise invert value to register.

The details of mov immediate encoding are listed in C4.2.5 of ARM ARM
(DDI 0487A.i).

Signed-off-by: Wei Chen <Wei.Chen@linaro.org>
Reviewed-by: Julien Grall <julien.grall@arm.com>
Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/arm64/head.S
xen/include/asm-arm/processor.h